<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    //向 storage 存储数据    localStorage  local 本地  storage 存储
    //1. 写入数据
    // localStorage.setItem('name','张三');
    // localStorage.setItem('age',28);

    //2. 读取数据
    // console.log(localStorage.getItem('name'));
    // console.log(localStorage.getItem('age'));

    //3. 移除
    // localStorage.removeItem('name');

    //4. 清空
    // localStorage.clear();



  </script>
</body>
</html>